import hashlib
import os

def generate_salt(length=16):
    return os.urandom(length).hex()

def encrypt_password(password, salt):
    return hashlib.sha256((password + salt).encode()).hexdigest()
